package com.yixin.hospital.entity.dto.req.check;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@ApiModel("新增盘点请求体")
@Data
public class CheckAddReqDTO {
    private Long id;

    @ApiModelProperty("盘点库房")
    @NotNull(message = "盘点库房不能为空")
    private Long checkDepositoryId;

    @ApiModelProperty("备注")
    private String remarks;

    @ApiModelProperty("状态")
    private Integer status;

    @ApiModelProperty("盘点列表")
    @NotNull(message = "盘点列表不能为空")
    List<CheckDetailAddReqDTO> checkDetailAddReqDTOList;

    @Data
    public static
    class CheckDetailAddReqDTO{

        private String drugCode;
        private String drugName;
        private String drugCommonName;
        private String drugForm;
        private String batchCode;
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date productTime;
        private Integer inventory;
        private Integer subInventory;
        private Integer checkNum;
        private Integer subCheckNum;
        private String drugSpecs;
        private String outerUnit;
        private String innerUnit;
        private Integer sellMethod;
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date expiration;

    }
}


